package com.teach;

// import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**<pre>
 * 登录用户
 * Class: com.teach.AuthUser
 * Copyright 2022 jlzhou.top Inc. All rights reserved.
 * Warning: this content is only for internal circulation of the company.
 *          It is forbidden to divulge it or use it for other commercial purposes.
 * </pre>
 * @author J.L.Zhou
 * @since 2022年10月22日 下午1:41:52
 * @version 1.0
 */
public class AuthUser {

  private static final ThreadLocal<AuthUser> authUser = new ThreadLocal<AuthUser>();

  @Getter
  @Setter
  private Integer userId;
//  @Getter
//  @Setter
//  private Integer schoolId;
  @Getter
  @Setter
  private String roleId;

  public static void set(AuthUser user) {
    authUser.set(user);
  }

  public static AuthUser get() {
    return authUser.get();
  }

  public static void remove() {
    authUser.remove();
  }
}
